/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aljfce.business.event.boundary;

import com.aljfce.business.calendar.control.CalendarManager;
import com.aljfce.business.entity.Calendar;
import com.aljfce.business.entity.Event;
import com.aljfce.business.entity.Notification;
import com.aljfce.business.entity.User;
import com.aljfce.business.entity.WeatherInformation;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Jacopo Ferrigno <jacopo.ferrigno@gmail.com>
 */
@ManagedBean
@ViewScoped
public class AcceptedEvent {

    @Inject
    private CalendarManager cm;
    
    @PersistenceContext
    private EntityManager em;
            
    private Notification notification;

    public Notification getNotification() {
        return notification;
    }

    public void setNotification(Notification notification) {
        this.notification = notification;
    }

    public void delete(Event event, User user) {
        cm.deleteEvent(event.getId(), user.getEmail());
        
    }

    public void back() {

    }

}
